﻿<h1>Wiki Markup Guide - Macros</h1>
This page provides a guide for adding macros to a wiki page.
<br />
<h2>Syntax Highlighted Code Snippet</h2>
<i>Allows for a code snippet to be styled according to the language specified.</i>
<br />
<h5>Source Markup</h5>
<pre>
{code:c#}
using System;
public class HelloWorld
{
   public static void Main(params string[] args)
   {
   Console.WriteLine(&quot;Hello World!&quot;);
   }
}
{code:c#}
</pre>
<br />
<h5>Rendered Markup</h5>
<div style="color:Black;background-color:White;"><pre>
<span style="color:Blue;">using</span> System;
<span style="color:Blue;">public</span> <span style="color:Blue;">class</span> HelloWorld
{
   <span style="color:Blue;">public</span> <span style="color:Blue;">static</span> <span style="color:Blue;">void</span> Main(<span style="color:Blue;">params</span> <span style="color:Blue;">string</span>[] args)
   {
   Console.WriteLine(<span style="color:#A31515;">&quot;Hello World!&quot;</span>);
   }
}
</pre></div>
<h5>Syntax Highlighting Supported Languages</h5>
Using {code:language} as shown above.
<br /><br />
<table>
    <tr>
        <th> Language </th>
        <th> Notes </th>
    </tr>
    <tr>
        <td> aspx c# </td>
        <td> Use for code snippets from .aspx, .ascx, .asax, .asmx, .master, and .skin files that have embedded C# code </td>
    </tr>
    <tr>
        <td> aspx vb.net </td>
        <td> Use for code snippets from .aspx, .ascx, .asax, .asmx, .master, and .skin files that have embedded VB.NET code </td>
    </tr>
    <tr>
        <td> ashx </td>
        <td> Use for code snippets from .ashx files </td>
    </tr>
    <tr>
        <td> c# </td>
        <td> Use for C# code snippets </td>
    </tr>
    <tr>
        <td> vb.net </td>
        <td> Use for VB.NET code snippets </td>
    </tr>
    <tr>
        <td> html </td>
        <td> Use for HTML code snippets </td>
    </tr>
    <tr>
        <td> sql </td>
        <td> Use for SQL code snippets </td>
    </tr>
    <tr>
        <td> javascript </td>
        <td> Use for JavaScript code snippets </td>
    </tr>
    <tr>
        <td> xml </td>
        <td> Use for snippets from .xml, .config, .dbml, and .xsd files </td>
    </tr>
</table>
<br /><br />
If you would like to see an additional language added to this list, please create an issue in our <a href="http://www.codeplex.com/CodePlex/WorkItem/List.aspx">IssueTracker</a>.
<br /><br />
<h2>Rss Macro</h2>
<i>The rss macro allows for the importing of external rss feeds into your wiki page.</i>
<h5>Required Parameters</h5>
<table>
    <tr>
        <th> Name </th>
        <th> Description </th>
        <th> Range </th>
    </tr>
    <tr>
        <td> url </td>
        <td> absolute url to rss feed </td>
        <td> n/a </td>
    </tr>
</table>
<br />
<h5>Optional Parameters</h5>
<table>
    <tr>
        <th> Name </th>
        <th> Description </th>
        <th> Range </th>
        <th> Default </th>
    </tr>
    <tr>
        <td> max </td>
        <td> maximum number of posts to display up to 20 </td>
        <td> 0-20 </td>
        <td> 20 </td>
    </tr>
    <tr>
        <td> titlesOnly </td>
        <td> show only the date and title of each post </td>
        <td> true/false </td>
        <td> false </td>
    </tr>
</table>
<br />
<h5>Source Markup</h5>
<pre>
{rss:url=http://local/Data/SyndicatedFeedFormatting/Rss.xml,max=1,titlesOnly=false}
</pre>
<h5>Rendered Markup</h5>
<div class="rss"><div class="accentbar"><span class="left">&nbsp;</span>Google News News Feed<span class="right">&nbsp;</span></div><div class="entry"><div class="title"><a href="http://news.google.com/news/url?sa=T&ct=us/0-0-0&fd=R&url=http://www.washingtonpost.com/wp-dyn/content/article/2009/02/18/AR2009021801159.html%3Fsid%3DST2009021801211&cid=1305539214&ei=i0GcSd7TIY7AlQT6tqmkCg&usg=AFQjCNGfHBtEiwd1j342SIAYhd6awfkB2w">Homeowner Affordability and Stability Plan - Washington Post</a></div><div class="moreinfo"><span class="date">Wednesday, February 18, 2009</span> &nbsp;|&nbsp; <span class="source">From <a target="_blank" href="http://local/Data/SyndicatedFeedFormatting/Rss.xml">Google News</a></span></div><p><font style="font-size:85%;font-family:arial,sans-serif"><br><div style="padding-top:0.8em;"><img alt="" height="1" width="1"></div><div class=lh><table border=0 align=right cellspacing=0 cellpadding=0cellpadding=3 style="font-size:100%;font-family:arial,sans-serif"><tr><td width=80 align=center style="padding-left:6px;" valign=top><a  href="http://news.google.com/news/url?sa=T&ct=us/0-0i-0&fd=R&url=http://www.voanews.com/english/2009-02-18-voa15.cfm&cid=1305539214&ei=i0GcSd7TIY7AlQT6tqmkCg&usg=AFQjCNEPwgRUoDKRINF_R0C2x9oX6iVGrg"><img src=http://nt0.ggpht.com/news?imgefp=6FuZELHgLWMJ&imgurl=www.voanews.com/english/images/AP-US-Pres-Barack-Obama-18Feb09-210.jpg width=80 height=80 alt="" border=1><br><font size=-2>Voice of America</font></a></td></tr></table><a href="http://news.google.com/news/url?sa=T&ct=us/0-0-0&fd=R&url=http://www.washingtonpost.com/wp-dyn/content/article/2009/02/18/AR2009021801159.html%3Fsid%3DST2009021801211&cid=1305539214&ei=i0GcSd7TIY7AlQT6tqmkCg&usg=AFQjCNGfHBtEiwd1j342SIAYhd6awfkB2w"><b>Homeowner Affordability and  Stability Plan</b></a><br><font size=-1><b><font color=#6f6f6f>Washington Post&nbsp;-</font> <nobr>39 minutes ago</nobr></b></font><br><font size=-1>The deep contraction in the economy and in the housing market has created devastating consequences for homeowners and communities  throughout the country.</font><br><font size=-1><a href="http://news.google.com/news/url?sa=T&ct=us/0-0-1&fd=R&url=http://uk.reuters.com/article/marketsNewsUS/idUKN0716431820090218&cid=1305539214&ei=i0GcSd7TIY7AlQT6tqmkCg&usg=AFQjCNHPiR7UkIK_h0e_IbRsRcE34jRJvQ">Fannie Mae, Freddie Mac bill sale calendar</a> <font size=-1 color=#6f6f6f><nobr>Reuters</nobr></font></font><br><font size=-1><a href="http://news.google.com/news/url?sa=T&ct=us/0-0-2&fd=R&url=http://www.nytimes.com/2009/02/19/business/19housing.html%3Fhp&cid=1305539214&ei=i0GcSd7TIY7AlQT6tqmkCg&usg=AFQjCNFRNijgPrv2zbV77dPKIcxp2b2zEg">Obama Plans $75 Billion Outlay to Fight Foreclosures</a> <font size=-1 color=#6f6f6f><nobr>New York Times</nobr></font></font><br><font size=-1 class=p><a href="http://news.google.com/news/url?sa=T&ct=us/0-0-3&fd=R&url=http://www.foxnews.com/politics/first100days/2009/02/18/obama-foreclosure-prevention-plan-reaches-billion/&cid=1305539214&ei=i0GcSd7TIY7AlQT6tqmkCg&usg=AFQjCNH2GqLNssl5YqjPfK0WOid0w88eXg"><nobr>FOXNews</nobr></a>&nbsp;- <a href="http://news.google.com/news/url?sa=T&ct=us/0-0-4&fd=R&url=http://www.bizjournals.com/washington/stories/2009/02/16/daily47.html&cid=1305539214&ei=i0GcSd7TIY7AlQT6tqmkCg&usg=AFQjCNEO3SI2m6zh5T6z4VUndJ48Zsm4ew"><nobr>Bizjournals.com</nobr></a>&nbsp;- <a href="http://news.google.com/news/url?sa=T&ct=us/0-0-5&fd=R&url=http://www.bloomberg.com/apps/news%3Fpid%3D20601087%26sid%3Da5xBdiMqKaqY%26refer%3Dhome&cid=1305539214&ei=i0GcSd7TIY7AlQT6tqmkCg&usg=AFQjCNFvTvz09dyUGK2LwVAu3tpFylgeQA"><nobr>Bloomberg</nobr></a>&nbsp;- <a href="http://news.google.com/news/url?sa=T&ct=us/0-0-6&fd=R&url=http://www.freep.com/article/20090218/NEWS15/90218003/1285/Obama%2Bseeks%2Bto%2Bkeep%2Bmillions%2Bin%2Btheir%2Bhomes&cid=1305539214&ei=i0GcSd7TIY7AlQT6tqmkCg&usg=AFQjCNGu4aycT7qzd_kQFFaSUmmgyVIZ6A"><nobr>Detroit Free Press</nobr></a></font><br/><font class=p size=-1><a class=p href=http://news.google.com/?ncl=1305539214&hl=en><nobr><b>all 1,505 news articles</b></nobr></a></font><br clear=all> </div></font></p></div><div class="accentbar"><span class="left">&nbsp;</span>Google News News Feed<span class="right">&nbsp;</span></div></div>
<br />
<h2>Video Macro</h2>
<i>The video macro allows you to insert video media into your wiki page</i>
<h5>Required Parameters</h5>
<table>
    <tr>
        <th> Name </th>
        <th> Description </th>
        <th> Range </th>
    </tr>
    <tr>
        <td> url </td>
        <td> absolute url to video media </td>
        <td> n/a </td>
    </tr>
    <tr>
        <td> type </td>
        <td> media type of the video </td>
        <td> flash/quicktime/real/windows/youtube </td>
    </tr>
</table>
<br />
<h5>Optional Parameters</h5>
<table>
    <tr>
        <th> Name </th>
        <th> Description </th>
        <th> Range </th>
        <th> Default </th>
    </tr>
    <tr>
        <td> align </td>
        <td> alignment of the video </td>
        <td> left/center/right </td>
        <td> center </td>
    </tr>
</table>
<br />
<h5>Source Markup</h5>
<pre>
{video:url=mms://wm.microsoft.com/ms/msnse/0607/28366/CodePlexTeam_Final_MBR.wmv,type=windows}
</pre>
<h5>Rendered Markup</h5>
<div class="video" style="text-align:Center"><span class="player"><object type="application/x-mplayer2" height="285px" width="320px" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"><param name="fileName" value="mms://wm.microsoft.com/ms/msnse/0607/28366/CodePlexTeam_Final_MBR.wmv"></param><param name="autostart" value="false"></param><embed type="application/x-mplayer2" height="285px" width="320px" src="mms://wm.microsoft.com/ms/msnse/0607/28366/CodePlexTeam_Final_MBR.wmv" pluginspage="http://www.microsoft.com/windows/windowsmedia/download/default.asp" autoplay="false" autostart="false" /></object></span><br /><span class="external"><a href="mms://wm.microsoft.com/ms/msnse/0607/28366/CodePlexTeam_Final_MBR.wmv" target="_blank">Launch in another window</a></span></div><br />
<h2>Silverlight Macro</h2>
<i>The Silverlight macro allows you to insert Silverlight applications into your wiki page</i>
<br />
<h5>Source Markup</h5>
<pre>
{silverlight:url=http://silverlight.net/samples/sl2/toolkitcontrolsamples/run/controls/Microsoft.Windows.Controls.Samples.xap,height=401,width=600}
</pre>
<h5>Rendered Markup</h5>
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" style="height:401px;width:600px;">
<param name="source" value="http://silverlight.net/samples/sl2/toolkitcontrolsamples/run/controls/Microsoft.Windows.Controls.Samples.xap"></param>
<param name="windowless" value="true"></param>
<param name="minRuntimeVersion" value="5.0.61118.0"></param>
<param name="autoUpgrade" value="true"></param>
<p>You need to install Microsoft Silverlight to view this content. <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none;">Get Silverlight!<br /><img src="http://go.microsoft.com/fwlink/?LinkID=108181" alt="Get Microsoft Silverlight" style="border-style:none;" /></a></p>
</object>
<iframe style="visibility:hidden;height:0;width:0;border-width:0;"></iframe>